Skip to content

Pre-1.0.0 polish: refactors, bug fix, storybook, and test coverage#30

Merged
gfargo merged 5 commits into
mainfrom
fix/pre-1.0-polish
May 5, 2026
Merged

Pre-1.0.0 polish: refactors, bug fix, storybook, and test coverage#30
gfargo merged 5 commits into
mainfrom
fix/pre-1.0-polish

Conversation

@gfargo
Copy link
Copy Markdown
Owner

@gfargo gfargo commented May 5, 2026

Pre-1.0.0 Polish

Consolidated PR with all pre-release fixes, organized as separate commits:

Commits

  1. refactor: remove duplicate searchable prop and default export

    • Properties<V> already inherits searchable from hook props — removed redundant declaration
    • Removed default export (only named export is re-exported from package entry)
  2. chore: add exports field to package.json, fix tsconfig comment

    • Modern exports map with types-first resolution
    • Added types field
    • Fixed tsconfig comment ("Node.js 14" → "Node.js 20+")
  3. chore: update storybook to demo all features

    • Added demos for groups, multi-select, searchable, scroll indicators
    • Main menu uses groups to categorize into "Classic" and "New in 1.0"
  4. fix: handle key.delete for backspace in searchable mode

    • Terminals send \x7f (DEL) for backspace, which Ink maps to key.delete not key.backspace
    • Handler now checks both key.backspace || key.delete
    • 5 new edge-case tests (searchable+multi, searchable+limit+nav, searchable+isFocused, Home/End on filtered, backspace widens filter)
  5. docs: add blog post outline for 1.0.0 release

Testing

133 tests passed
yarn lint — clean

Supersedes PRs #27, #28, #29 (can be closed).

gfargo added 5 commits May 5, 2026 16:16
- Properties<V> already inherits searchable from UseEnhancedSelectInputProperties<V>
- Remove redundant declaration in Properties
- Component now reads searchable from hookProperties directly
- Remove default export (only named export is re-exported from package entry)
- Add 'exports' map with types and import conditions for modern ESM resolution
- Add 'types' field pointing to dist/index.d.ts
- Fix tsconfig target comment: was 'Node.js 14', now 'Node.js 20+'
Add demos for item groups, multi-select, searchable mode, and scroll
indicators. The main menu now uses groups itself to categorize demos
into 'Classic' and 'New in 1.0' sections.
…e tests

The backspace handler only checked key.backspace, but terminals send
\x7f (DEL) which Ink maps to key.delete, not key.backspace. Now checks
both key.backspace and key.delete.

New tests (5):
- searchable + multiple: filter then confirm checked items
- searchable + limit: navigation within paginated filtered results
- searchable + isFocused=false: typing blocked
- searchable: Home/End on filtered results
- searchable: backspace progressively widens filter results
@gfargo gfargo merged commit 5233162 into main May 5, 2026
3 checks passed
@gfargo gfargo deleted the fix/pre-1.0-polish branch May 5, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant